/**
 * 
 */
package org.codesketch.controller.configuration;

import org.codesketch.birch.command.Birch;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.aspectj.EnableSpringConfigured;

/**
 * @author Quirno Brizi
 *
 */
@Configuration
//@EnableLoadTimeWeaving
@EnableSpringConfigured
//@EnableAspectJAutoProxy
@ComponentScan(basePackages={"org.codesketch.controller.common", "org.codesketch.controller.service", "org.codesketch.controller.dao"})
@PropertySource({"classpath:amazonaws.properties"})
public class ApplicationContextConfig {

	@Value("${amazon.aws.access.key}")
	private transient String accessKey;
	@Value("${amazon.aws.secret.key}")
	private transient String secretKey;
	@Value("${amazon.aws.endpoint}")
	private transient String endpoint;
	
	@Bean
	public Birch birch() {
		return Birch.with(accessKey, secretKey, endpoint);
	}
}
